@use "shared";

.dp--tp-wrap {
  width: 100%;

  &[data-dp-mobile] {
    max-width: 100%;
  }
}

.dp__time_input {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-family: var(--dp-font-family);
  color: var(--dp-text-color);
}

.dp__time_col_reg_block {
  padding: 0 20px;
}

.dp__time_col_reg_inline {
  padding: 0 10px;
}

.dp__time_col_reg_with_button {
  padding: 0 15px;

  &[data-compact~="true"] {
    padding: 0 5px;
  }
}

.dp__time_col_sec {
  padding: 0 10px;
}

.dp__time_col_sec_with_button {
  padding: 0 5px;

  &[data-collapsed~="true"] {
    padding: 0;
  }
}

.dp__time_col {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.dp__time_col_block {
  font-size: var(--dp-time-font-size);
}

.dp__inc_dec_button_disabled {
  @extend %__dp_time_arrow_disabled;

  &:hover {
    @extend %__dp_time_arrow_disabled;
  }
}



.dp__time_display_block {
  padding: 0 3px;
}

.dp__time_display_inline {
  padding: 5px;
}

.dp__time_picker_inline_container {
  display: flex;
  width: 100%;
  justify-content: center;
}

.dp__inc_dec_button {
  padding: 5px;
  margin: 0;
  height: var(--dp-time-inc-dec-button-size);
  width: var(--dp-time-inc-dec-button-size);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  color: var(--dp-icon-color);
  box-sizing: border-box;

  svg {
    height: var(--dp-time-inc-dec-button-size);
    width: var(--dp-time-inc-dec-button-size);
  }

  &:hover {
    background: var(--dp-hover-color);
    color: var(--dp-hover-icon-color);
  }
}

.dp__time_display {
  cursor: pointer;
  color: var(--dp-text-color);
  border-radius: var(--dp-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover:enabled {
    background: var(--dp-hover-color);
    color: var(--dp-hover-text-color);
  }
}


.dp__inc_dec_button_inline {
  width: 100%;
  padding: 0;
  height: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

%__dp_time_arrow_disabled {
  background: var(--dp-disabled-color);
  color: var(--dp-disabled-color-text);
  cursor: not-allowed;
}



.dp__pm_am_button {
  background: var(--dp-primary-color);
  color: var(--dp-primary-text-color);
  border: none;
  padding: var(--dp-common-padding);
  border-radius: var(--dp-border-radius);
  cursor: pointer;

  &[data-compact~="true"] {
    padding: 7px;
  }
}

.dp__tp_inline_btn_bar {
  width: 100%;
  height: 4px;
  background-color: var(--dp-secondary-color);
  transition: var(--dp-common-transition);
  border-collapse: collapse;

}

.dp__tp_inline_btn_top:hover {
  .dp__tp_btn_in_r {
    background-color: var(--dp-primary-color);
    transform: rotate(12deg) scale(1.15) translateY(-2px);
  }

  .dp__tp_btn_in_l {
    background-color: var(--dp-primary-color);
    transform: rotate(-12deg) scale(1.15) translateY(-2px);
  }
}

.dp__tp_inline_btn_bottom:hover {
  .dp__tp_btn_in_r {
    background-color: var(--dp-primary-color);
    transform: rotate(-12deg) scale(1.15) translateY(-2px);
  }

  .dp__tp_btn_in_l {
    background-color: var(--dp-primary-color);
    transform: rotate(12deg) scale(1.15) translateY(-2px);
  }
}

.dp--time-overlay-btn {
  @extend %dp--btn-placeholder;

  background: none;
}

.dp--time-invalid {
  @extend %dp--btn-placeholder;

  background-color: var(--dp-disabled-color);
}
